Welcome to 'The Serverless Framework.' After watching this video, you will be able to describe the Serverless Framework, explain how to create a basic
Serverless function, and explain how to test a Serverless function. The Serverless Framework is a free and
open-source web framework written using Node.js. It was originally designed to provision your
Amazon Web Services or AWS Lambda Functions, Events and infrastructure
Resources safely and quickly. But it is not limited to AWS. Other supported providers are: Microsoft Azure,
Google Cloud Platform, and Apache OpenWhisk. Serverless Framework is a command line interface
or CLI that offers structure, automation and best practices out-of-the-box, allowing you
to focus on building sophisticated, event-driven, serverless architectures, comprising of
functions, events, resources, and services. Now a function is merely code, deployed in the cloud, that is most often written
to perform a single task. Each function is an independent unit of
execution and deployment, like a microservice. A task can be saving a user to the database
or performing a job at a specified time. Functions are triggered by events, and
events come from other resources, for example: An HTTP request on an API Gateway URL
or a new file uploaded in an S3 bucket. Resources are infrastructure components
which your functions use, such as a database provided to you as a service by your cloud
provider, or an S3 bucket to store files. A service is the Framework's unit of organization. You can think of it as a project file, though you can have multiple
services for a single application. A service is configured via a serverless.yml file where you define your functions,
events and resources to deploy. And when deploying with the Framework CLI, everything
in the configuration file is deployed at once. The serverless.yml file controls
everything in your service. There are specific sections in serverless.yml
to specify functions, events, and resources. So let’s build and deploy a Hello World application
using the Serverless Framework on AWS. For this demo, you already
have the AWS credentials setup. First, you need the serverless CLI,
which you can install using npm globally, then run the serverless command to create
your first AWS HTTP API using Python. The command will take you through a wizard and
once deployed, will provide you with a URL. If you open in the browser, you
will see an outcome as shown. You changed the function code to
return Hello World on request. Then you can simply redeploy and test again. In this video, you learned that The Serverless Framework is a free and
open-source web framework written using Node.js. Functions are triggered by events. A service is configured via a serverless.yml file. And there are specific sections in serverless.yml
to specify functions, events, and resources.